public class SaveMoney {
	public static void main(String[] args) {
		// 假设存入10000元，存期2.5年，年利率2.25%
		double money = 10000;
		double year = 2.5;
		double rate = 0.0225;

		// 创建两家银行的实例
		Bank cb = new ConstructionBank(money, year, rate);
		Bank db = new BankOfDalian(money, year, rate);

		// 计算利息
		double cbInterest = cb.computerInterest();
		double dbInterest = db.computerInterest();

		// 输出结果
		System.out.println("建设银行利息：" + cbInterest + "元");
		System.out.println("大连银行利息：" + dbInterest + "元");
		System.out.println("利息差：" + (dbInterest - cbInterest) + "元");
	}
}